<?php /* Smarty version 2.6.6, created on 2013-10-25 15:20:04
         compiled from view_playlist.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('insert', 'get_audio_categories', 'view_playlist.tpl', 13, false),array('insert', 'get_advertisement', 'view_playlist.tpl', 25, false),array('insert', 'get_seotitle_from_audioid', 'view_playlist.tpl', 101, false),array('modifier', 'stripslashes', 'view_playlist.tpl', 16, false),array('modifier', 'file_exists', 'view_playlist.tpl', 104, false),array('modifier', 'truncate', 'view_playlist.tpl', 116, false),)), $this); ?>
<div id="main_wrap">
	<div class="center_wrap clearfix">
        <h2 class="no_bottom no_top breadcrumb">
        	<a href="<?php echo $this->_tpl_vars['baseurl']; ?>
/categories/">view playlist</a> 
        </h2>

		<div id="sidebar_wrap">
  			<div id="list_cats">
			<a class="category-txt" href="<?php echo $this->_tpl_vars['baseurl']; ?>
/categories/">
	<img alt="Category" src="<?php echo $this->_tpl_vars['baseurl']; ?>
/images/tjj_music_we_categories.jpg">
        </a>
    			<ul id="ul_categories">
                	<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');
echo smarty_core_run_insert_handler(array('args' => array('name' => 'get_audio_categories', 'assign' => 'listaudiocategories')), $this); ?>

        			<?php unset($this->_sections['o']);
$this->_sections['o']['name'] = 'o';
$this->_sections['o']['loop'] = is_array($_loop=$this->_tpl_vars['listaudiocategories']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['o']['show'] = true;
$this->_sections['o']['max'] = $this->_sections['o']['loop'];
$this->_sections['o']['step'] = 1;
$this->_sections['o']['start'] = $this->_sections['o']['step'] > 0 ? 0 : $this->_sections['o']['loop']-1;
if ($this->_sections['o']['show']) {
    $this->_sections['o']['total'] = $this->_sections['o']['loop'];
    if ($this->_sections['o']['total'] == 0)
        $this->_sections['o']['show'] = false;
} else
    $this->_sections['o']['total'] = 0;
if ($this->_sections['o']['show']):

            for ($this->_sections['o']['index'] = $this->_sections['o']['start'], $this->_sections['o']['iteration'] = 1;
                 $this->_sections['o']['iteration'] <= $this->_sections['o']['total'];
                 $this->_sections['o']['index'] += $this->_sections['o']['step'], $this->_sections['o']['iteration']++):
$this->_sections['o']['rownum'] = $this->_sections['o']['iteration'];
$this->_sections['o']['index_prev'] = $this->_sections['o']['index'] - $this->_sections['o']['step'];
$this->_sections['o']['index_next'] = $this->_sections['o']['index'] + $this->_sections['o']['step'];
$this->_sections['o']['first']      = ($this->_sections['o']['iteration'] == 1);
$this->_sections['o']['last']       = ($this->_sections['o']['iteration'] == $this->_sections['o']['total']);
?>
                    <?php if ($_REQUEST['filter'] == $this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['CATID']): ?>
                    <li><b><?php echo ((is_array($_tmp=$this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['name'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
</b></li>
                    <?php else: ?>
	    			<li><a href="<?php echo $this->_tpl_vars['baseurl']; ?>
/browse/categories/audios/z/<?php echo $this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['CATID']; ?>
/1/<?php echo ((is_array($_tmp=$this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['name'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
"><?php echo ((is_array($_tmp=$this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['name'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
</a></li>
                    <?php endif; ?>
        			<?php endfor; endif; ?>
                </ul>
  			</div>
  			<div class="sky_ad">
            	<center>
            	<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');
echo smarty_core_run_insert_handler(array('args' => array('name' => 'get_advertisement', 'value' => 'var', 'AID' => '2')), $this); ?>

                </center>
            </div>
		</div>
        
		<div class="right col1" style="margin:0px;">
            <div class="cat_box_full clearfix" id="browse_main"> 
			
            					<table width="100%" cellspacing="3" cellpadding="3" border="0">
					<tr>
						<td valign="top">
							<h2><?php echo $this->_tpl_vars['playlist'][0]['playlist_title']; ?>
</h2>
						</td>
                    </tr>
					<?php if ($this->_tpl_vars['deleteMsg'] != ""): ?>
						<tr>
							<td>
								<div id="smsg" class="errorPage clearfix" style="">
									<h2 style="font-size:18px"><?php echo $this->_tpl_vars['deleteMsg']; ?>
</h2>
								</div>
							</td>
						</tr>
					<?php endif; ?>	
				</table>
                <div class="cat_body_full clearfix">
                  <!-- LOOP START -->
                  
                <?php if ($this->_tpl_vars['error'] != ""): ?>
                <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "show_error.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
                <?php endif; ?>
                <?php if ($this->_tpl_vars['showmessage'] != ""): ?>
                <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "show_message.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
                <?php endif; ?>
				<?php if ($this->_tpl_vars['error'] == ""): ?> 
                  <div>
      				<span id="player"> We recently encoded our videos in a newer Flash format. You need to 
                        <br />
                        get the latest <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> to see this video.
                    </span>
						
						
					 
					 <script type="text/javascript">
						var s1 = new SWFObject("<?php echo $this->_tpl_vars['baseurl']; ?>
/player.swf","flvplayer","450","450","7");
						s1.addParam("allowfullscreen","true");
						/*s1.addVariable("width","500");
						s1.addVariable("height","300");
						s1.addVariable("displayheight","300");*/
						s1.addVariable("file","<?php echo $this->_tpl_vars['baseurl']; ?>
/playlists/<?php echo $this->_tpl_vars['playlistID']; ?>
.xml");
						s1.addVariable("autostart","true");
						s1.addVariable("autoplay","true");
						s1.addVariable("autoplay","on");
						s1.addVariable("screencolor","#FFFFFF");
						s1.addVariable("playlist","bottom");
						s1.addVariable("repeat","list");
						s1.addVariable("playlist.size","100");
						s1.write("player");
					</script> 
    			</div>
				<?php endif; ?>
				<div id="browse_results">
				<?php if ($this->_tpl_vars['userID'] != '0' && $this->_tpl_vars['playlist'][0]['USERID'] == $this->_tpl_vars['userID']): ?>
				<form method="POST" action="<?php echo $this->_tpl_vars['baseurl']; ?>
/view_playlist.php?ID=<?php echo $this->_tpl_vars['playlistID']; ?>
" onsubmit="return chkAudios();">
				<?php endif; ?>
					<ul>
						<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['listaudios']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
							<li class="video">
								<div class="video_i">
									<a href="<?php echo $this->_tpl_vars['baseurl']; ?>
/audios/<?php echo $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['AUDIOID']; ?>
/<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');
echo smarty_core_run_insert_handler(array('args' => array('name' => 'get_seotitle_from_audioid', 'assign' => 'title', 'audioid' => $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['AUDIOID'])), $this); ?>
">
																				<?php ob_start(); ?>images/audiothumbs/<?php echo $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['AUDIOID']; ?>
-1<?php echo $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['ext'];  $this->_smarty_vars['capture']['default'] = ob_get_contents();  $this->assign('player', ob_get_contents());ob_end_clean(); ?> 
                                        <?php if (((is_array($_tmp=$this->_tpl_vars['player'])) ? $this->_run_mod_handler('file_exists', true, $_tmp) : file_exists($_tmp))): ?>
                                            <img class="imag" height="87" width="116" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['title'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" src="<?php echo $this->_tpl_vars['athumburl']; ?>
/<?php echo $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['AUDIOID']; ?>
-1<?php echo $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['ext']; ?>
" />
                                        <?php else: ?>
                                            <img class="imag" height="87" width="116" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['title'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" src="<?php echo $this->_tpl_vars['athumburl']; ?>
/default.png" />
                                        <?php endif; ?>
										<div class="tag"></div>
									</a>
									<a href="<?php echo $this->_tpl_vars['baseurl']; ?>
/audios/<?php echo $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['AUDIOID']; ?>
/<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');
echo smarty_core_run_insert_handler(array('args' => array('name' => 'get_seotitle_from_audioid', 'assign' => 'title', 'audioid' => $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['AUDIOID'])), $this); ?>
">
										<span class="artist_name">
											<?php if (((is_array($_tmp=$this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['artist'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)) == ""): ?>
												Anonymous
											<?php else: ?>
                                                                                            <?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['artist'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)))) ? $this->_run_mod_handler('truncate', true, $_tmp, 15, "...", true) : smarty_modifier_truncate($_tmp, 15, "...", true)); ?>
 
											<?php endif; ?>
											</span>
										<span class="song_name"><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['title'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)))) ? $this->_run_mod_handler('truncate', true, $_tmp, 15, "...", true) : smarty_modifier_truncate($_tmp, 15, "...", true)); ?>
</span>
									</a>
									<?php if ($this->_tpl_vars['userID'] != '0' && $this->_tpl_vars['playlist'][0]['USERID'] == $this->_tpl_vars['userID']): ?>
										<div>Remove <input type="checkbox" name="audio[]" value="<?php echo $this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['AUDIOID']; ?>
" /></div>
									<?php endif; ?>
									
								</div>
							</il>
						<?php endfor; endif; ?>	
					</ul>
					<?php if ($this->_tpl_vars['userID'] != '0' && $this->_tpl_vars['playlist'][0]['USERID'] == $this->_tpl_vars['userID'] && $this->_tpl_vars['error'] == ''): ?>
						<div class="clear"></div>
						<input type="Submit" value="Remove" name="remove" id="remove" />
						</form>
					<?php endif; ?>
				</div> 
                  <!-- LOOP END -->
    
                </div>

                <div class="paginate">
                	<?php echo $this->_tpl_vars['pagelinks']; ?>

                                    </div>
  			</div>
		</div>
    	<div class="clear"></div>
	</div>
</div>
<?php echo '
<script type="text/javascript">
var $j = jQuery.noConflict();
	function chkAudios(){
	
		var atLeastOneIsChecked = jQuery(\'input[name="audio[]"]:checked\').length;
		if(atLeastOneIsChecked<=0){
			alert("Please select atleast one audio to remove from the playlist.");
			return false;
		}
		else 
			return true;
	}
</script>
'; ?>